package com.woniuxy.yoga.course.client;

import com.woniuxy.yoga.commons.core.model.Result;
import com.woniuxy.yoga.course.client.dto.order.OrderInfoDto;
import com.woniuxy.yoga.course.client.form.CreatePriOrderForm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 订单服务的访问类
 */
@FeignClient(name = "order-service",path = "/order")
public interface OrderClient {

    /**
     * 私教课教练同意生成订单
     * @param form 私教课教练同意生成参数
     * @return OrderInfoDto
     */
    @PostMapping("/orderInfo/createPriOrder")
    public Result<OrderInfoDto> createOrder(@RequestBody CreatePriOrderForm form);
}
